home *** CD-ROM | disk | FTP | other *** search
- Copyright (C) 1989, 1990 Aladdin Enterprises. All rights reserved.
- Distributed by Free Software Foundation, Inc.
-
- This file is part of Ghostscript.
-
- Ghostscript is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
- to anyone for the consequences of using it or for whether it serves any
- particular purpose or works at all, unless he says so in writing. Refer
- to the Ghostscript General Public License for full details.
-
- Everyone is granted permission to copy, modify and redistribute
- Ghostscript, but only under the conditions described in the Ghostscript
- General Public License. A copy of this license is supposed to have been
- given to you along with Ghostscript so you can know your rights and
- responsibilities. It should be in a file named COPYING. Among other
- things, the copyright notice and this notice must be preserved on all
- copies.
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- This file, todo.doc, contains a somewhat incoherent set of notes about
- things that could be improved in Ghostscript.
-
- For an overview of Ghostscript and a list of the documentation files, see
- README.
-
- Storage manager
- ===============
-
- Save & restore
- --------------
-
- Some unobvious things that need to be saved/restored:
- - Names added to the name table must be removed.
- - Dictionary access changes must be undone.
- - The packing state must be restored.
-
- Reclamation
- -----------
-
- Put a prefix on every object that carries its type and size. Use the type
- to index a table of type descriptors. One of the elements of the type
- descriptor is a procedure that knows where to find all the pointers
- embedded in the object. (This is needed for recursive freeing.) For the
- library level, we need a bit in the prefix to say "the client is holding a
- reference to this object", and explicit freeing operations, because C
- doesn't give us the handles we need to find references.
-
- Handle subrange objects differently. Define two new types t_subarray
- and t_substring. These carry their size, and point to an intermediate
- object that references the main object and an offset within it.
-
- Interpreter
- -----------
-
- Allocate stacks in chunks, again like obstack. Detect overflow in the
- interpreter (except for the few operators that can push an unbounded
- amount of information) and skim off the top 20% of the current chunk
- into a new one. Detect underflow in the interpreter (except for the few
- operators that take an unbounded number of operands) and pop back to the
- previous chunk. Do this for all 3 stacks.
-
- Notes on reference counting
- ---------------------------
-
- The current sources use a set of macros that are supposed to prepare the
- way for a reference-counting storage manager. Here is a list of places
- where things are known not to work quite right.
-
- In the following places, a ref* argument is passed to a procedure that
- may store a pointer ref, possibly requiring reference counting.
- dict_create (pref)
- name_ref (pref)
- name_string_ref (psref)
- name_enter (pref)
-
- The following places hold pointers that are not refs.
- name->pvalue
- dict_find ppvalue return value
-
- There are many, many places in the scanner that store refs. We haven't
- done anything about any of them.
-
- We do NOT count references from the graphics state.
-
- The **REAL** to-do list
- =======================
-
- The REAL to-do list is the bug list in readme.doc. Here are some other
- odds and ends. Things marked with ** are partially implemented.
-
- ** Move error names from ghost.ps to interpreter
- ** Change to the new GNU license
- Implement trailing moveto in Type 1 characters
- Allow (|cmd) or (cmd|) as file names on Unix (at least)
- Detect tail recursion in executable strings (pop when string is empty)
- Put Ghostscript extended operators in a separate dictionary?
- Make stacks expandable?
- Automatically expand dicts?
-